﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Strongshell.Recoil.Core.Composition.Workflow
{
    /// <summary>
    /// Fluent interface for wiring properties and fields.
    /// </summary>
    /// <typeparam name="TTarget">The type of the recieving object.</typeparam>
    /// <typeparam name="TProperty">The type of the field or poperty.</typeparam>
    public interface IMappingFragment<TTarget,TProperty>
    {
        /// <summary>
        /// Wires a property or field to the value, reference or embedded object(s) provided in the expression.
        /// 
        /// Usage is:
        /// 
        /// To(() => [expression]) or To(() => [value])
        /// </summary>
        /// <param name="valueExpression">The expression that describes the wiring.</param>
        /// <returns>Fluent interface for configuring the object definition.</returns>
        IDefinitionFragment<TTarget> To(Expression<Func<TProperty>> valueExpression);
    }
}